package com.hdjk.view.callback;

import com.lst.projectlib.entity.Msg;

import org.json.JSONObject;

import okhttp3.Response;

/**
 * Created by Admin on 2017/10/25.
 */

public abstract class OpenAccountCallback extends MsgCallBack {
    @Override
    public Msg parseNetworkResponse(Response response, int id)
            throws Exception {

        Msg msg = super.parseNetworkResponse(response, id);
        JSONObject object = (JSONObject) msg.getData();
        if (object!=null) {
            if (!object.isNull("accountNumber")) {
                msg.setResult(object.getString("accountNumber"));
            }
        }
        return msg;
    }
}